/**
 * Copyright (c) 2020 All Rights Reserved.
 */
package com.deer.wms.api.configurer;

import org.apache.log4j.DailyRollingFileAppender;
import org.apache.log4j.Priority;

/**
 * @author owen
 * @version $$Id: WmsDailyRollingFileAppender, v 0.1 2021/2/26 下午6:20 owen Exp $$
 */
public class WmsDailyRollingFileAppender extends DailyRollingFileAppender {

    /**
     * 不输出ERROR级别的日志
     *
     * @param priority
     * @return
     */
    @Override
    public boolean isAsSevereAsThreshold(Priority priority) {
        if (priority.equals(Priority.ERROR)) {
            return false;
        }
        return super.isAsSevereAsThreshold(priority);
    }
}
